<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
</head>
<body>
<script>
    function ClassA(){
        var self = this;
        this.i =   1;

        this.aa = function(){
            this.i ++;
            alert(this.i);
        }

        var private_bb = function(){         //私有方法     i ,aa 必须通过self调用
            alert(self.i);
            self.aa();
//            alert(this.i);       //undefined

        }

        this.cc = function(){          //私有方法     i ,aa 必须通过self调用
            private_bb();
        }

        function public_dd(){
            alert(self.i);
            self.aa();
        }
    }

    var o = new ClassA();
    o.aa();
    o.cc();

</script>
</body>
</html>